package main

val arrayOfInt: IntArray = intArrayOf(1, 3, 4, 6, 7)
val arrayOfChar: CharArray = charArrayOf('h', 'e', 'l', 'l', 'o')
val arrayOfString: Array<String> = arrayOf("Hello","world")

fun main() {
    println(arrayOfString.size)
    println(arrayOfInt[1])
    for (int in arrayOfInt){
        print("$int,")
    }
    //将字符数组转换为字符串，第一个参数为分割符
    println(arrayOfChar.joinToString(""))
    println(arrayOfChar.slice(1..4))
}